package com.ruoyi.project.jiaqin.downtrend.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.jiaqin.downtrend.mapper.DownTrendMapper;
import com.ruoyi.project.jiaqin.downtrend.domain.DownTrend;
import com.ruoyi.project.jiaqin.downtrend.service.IDownTrendService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 羽绒价格走势Service业务层处理
 *
 * @author admin
 * @date 2021-01-29
 */
@Service
public class DownTrendServiceImpl implements IDownTrendService
{
    @Autowired
    private DownTrendMapper downTrendMapper;

    /**
     * 查询羽绒价格走势
     *
     * @param id 羽绒价格走势ID
     * @return 羽绒价格走势
     */
    @Override
    public DownTrend selectDownTrendById(String id)
    {
        return downTrendMapper.selectDownTrendById(id);
    }

    @Override
    public List<DownTrend> selectDownTrendSeven(String downClassId, String downStandardId, String downMeasureId) {
        return downTrendMapper.selectDownTrendSeven(downClassId,downStandardId,downMeasureId);
    }

    @Override
    public List<DownTrend> selectDownTrendMonth(String downClassId, String downStandardId, String downMeasureId) {
        return downTrendMapper.selectDownTrendMonth(downClassId,downStandardId,downMeasureId);
    }

    /**
     * 查询羽绒价格走势列表
     *
     * @param downTrend 羽绒价格走势
     * @return 羽绒价格走势
     */
    @Override
    public List<DownTrend> selectDownTrendList(DownTrend downTrend)
    {
        return downTrendMapper.selectDownTrendList(downTrend);
    }

    /**
     * 新增羽绒价格走势
     *
     * @param downTrend 羽绒价格走势
     * @return 结果
     */
    @Override
    public int insertDownTrend(DownTrend downTrend)
    {
        return downTrendMapper.insertDownTrend(downTrend);
    }

    /**
     * 修改羽绒价格走势
     *
     * @param downTrend 羽绒价格走势
     * @return 结果
     */
    @Override
    public int updateDownTrend(DownTrend downTrend)
    {
        return downTrendMapper.updateDownTrend(downTrend);
    }

    /**
     * 删除羽绒价格走势对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteDownTrendByIds(String ids)
    {
        return downTrendMapper.deleteDownTrendByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除羽绒价格走势信息
     *
     * @param id 羽绒价格走势ID
     * @return 结果
     */
    @Override
    public int deleteDownTrendById(String id)
    {
        return downTrendMapper.deleteDownTrendById(id);
    }
}
